Method and apparatus for regulating the hydrate formation temperature in a metal-halogen battery

ABSTRACT

Temperature control mechanism takes the form of discrete electronic circuit or programmed digital computer for accurately regulating the temperature of a hydrate forming solution in a metal halogen battery during charge. The electronic circuit and/or digital computer senses the actual solution temperature, by measuring the temperature of coolant circuit in thermal communication therewith. The actual temperature is compared with a set point temperature based on curve fitting algorithm for approximating the hydrate formation temperature which changes during charge. For sufficiently large differences between actual and set point temperatures, an electrical impulse is applied to servo driven mixing value to selectively increase or decrease flow of chilled coolant to the coolant circuit.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention broadly relates to improved electrical energystorage systems, more particularly to metal halogen battery systems.More specifically, the invention relates to a method of and apparatusfor dynamically maintaining the hydrate formation temperature within ahydrate forming solution during charge.

2. Description of the Prior Art

The electrical energy storage systems of the type referred to herein,(e.g., a zinc-chlorine battery) utilize a halogen hydrate as a source ofhalogen component for reduction at a normally positive electrode, and anoxidizable metal adapted to become oxidized at a normally negativeelectrode during the normal discharge of the storage system. An aqueouselectrolyte is employed for replenishing the supply of the halogencomponent as it becomes reduced at the positive electrode. Theelectrolyte contains the dissolved ions of the oxidized metal and thereduced halogen, and is circulated between the electrode area and astorage area containing halogen hydrate, which progressively decomposesduring a normal discharge of the electrical energy system liberatingadditional elemental halogen to be consumed at the positive electrode.Electrical energy storage systems or battery systems of this type aredescribed in prior patents owned by the same assignee as the presentinvention, such as U.S. Pat. No. 3,713,888, U.S. Pat. No. 3,993,502,U.S. Pat. No. 4,001,036, and U.S. Pat. No. 4,146,680. Such systems arealso described in U.S. patents owned by the assignee of the presentinvention, such as U.S. Pat. No. 4,413,042, issued Nov. 1, 1983,entitled Inert Gas Rejection System for Metal Halogen Batteries, andU.S. Pat. No. 4,400,446, issued Aug. 23, 1983, and entitled HalogenHydrate Storage Device for Mobile Zinc-Chloride Battery Systems, U.S.Pat. No. 4,415,847, issued Nov. 15, 1983, entitled Method and Apparatusfor Supplying Cooling Liquid to a Storage Battery.

The basic operation of a metal halogen battery, such as an aqueouszinc-chloride battery system with graphite and/or other stable electrodesubstrates is as follows. In charge, an electrolyte pump deliversaqueous electrolyte to pockets between pairs of porous graphite-chlorineelectrodes in a battery stack comprised of a plurality of cells. Theelectrolyte passes through the porous chlorine electrodes into a chamberbetween opposite polarity electrodes, flows up between the electrodes,then flows back into the battery sump. Chlorine gas liberated fromporous graphite electrode substrates is pumped by a gas pump, and beforeentering the gas pump, the chlorine is mixed with electrolyte chilled bya chiller unit. The chlorine and chilled electrolyte are mixed in thegas pump, chlorine hydrate forms, and the chlorine hydrate-electrolytemixture is deposited in the store. In discharge, chlorine is liberatedfrom hydrate by decomposition of chlorine hydrate in the store byinjection of warm electrolyte from the sump. On development of therequired chlorine gas pressure in the store, the chlorine is injectedand mixed with and dissolved in the electrolyte, which is then fed intothe porous electrodes in the battery stack. The battery stack is thendischarged, wherein the electrode dissolution of zinc occurs at the zincelectrode, reduction of the dissolved chlorine occurs at the chlorineelectrode, power is available from the battery terminals, and zincchloride formed in the electrolyte by reaction of zinc and chlorine toform zinc chloride.

During charge, in order for the hydrate to form properly, thetemperature within the electrolyte must be closely controlled withintolerances on the order of a few tenths of a degree centigrade. Aproblem with presently available chiller units is that they have provengenerally deficient in providing closely controlled temperatures. Thusit is an object of the present invention to provide a method andapparatus for controlling the hydrate formation tempterature duringcharge, and a further object to provide very precise temperature controlof the hydrate forming electrolyte. Another object is to provide amethod and apparatus for controlling the hydrate formation temperatureduring charge which utilizes servo control based on rate control,thereby allowing implementation using comparatively inexpensivebi-directional AC servo motors and the like.

These and other objects and advantages of the invention will becomeapparent from the subsequent description and the appended claims takenin conjunction with the accompanying drawings. It is also to beunderstood that the invention herein is applicable to numerous differentconstructional arrangements of metal halogen battery systems.

SUMMARY OF THE INVENTION

The method of the present invention comprises controlling thetemperature within a metal-halogen battery of the type having a supplyof hydrate forming solution or electrolyte; a first coolant circuit forexchanging heat with the solution or electrolyte; and a chiller forremoving heat from the coolant circuit. In accordance with the inventionthe chiller includes a refrigeration means and second coolant circuitfor transferring heat to the refrigeration means, and a proportionalmixing valve for coupling the first and second cooling circuits. Themethod comprises determining the temperature of the electrolytesolution, preferably by measuring the temperature withing the firstcoolant circuit at or near the point where heat is exchanged between thecoolant circuit and the electrolyte solution. A set point temperature isdetermined based on the temperature of the solution in accordance withthe curve fitting algorithm which approximates the hydration formationtemperature as a function of charge stored in the battery. The set pointtemperature may also be based on the hydrate concentration within theelectrolyte solution which is generally proportional to the charge. Theset point temperature and actual temperature of the solution arecompared to produce an error value having a magnitude representative ofthe absolute difference between actual temperature and set pointtemperature, and further having a sign indicative of whether the setpoint temperature is above or below the actual temperature. Electricalimpulses are produced at time intervals which vary in accordance withthe magnitude of the error value. Preferably the electrical impulsesmaintain a substantially constant pulse width or on time duration, butvary in pulse to pulse occurrence in proportion with the error value.The proportional mixing valve is controlled in accordance with theelectrical impulses whereby the valve is caused to selectively increaseor decrease coupling between the first and second cooland circuitsdepending on the sign or polarity of the error value. The mixing valveis adjusted, either to increase or decrease the degree of mixing betweenthe first and second coolants, each time an electrical impulse occurs.For example, an error value having a first sense of polarity might causethe mixing valve to incrementally increase the degree of mixing witheach successive impulse, while an error value of the other sense ofpolarity would cause the mixing valve to decrease the degree of mixing.If the error is below a determined amount, no electrical impulse isproduced and accordingly no mixing valve adjustment is made.

The apparatus for implementing the above-described method, in a firstembodiment, comprises a digital computer programed to perform the abovesteps as will be more fully discussed below. A second embodiment,discussed below, implements the method utilizing discrete components,integrated circuits and combinational logic components.

Other objects, features, and advantages of the present invention willbecome apparent from the subsequent description and the appended claims,taken in conjunction with the accompanying drawings, in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram illustrating a typical metal halogenbattery system in conjunction with the present invention;

FIG. 2 is a graph depicting the relationship between halogen formationtemperature and charge useful in describing the curve fitting algorithmof the present invention;

FIG. 3 is a flow chart diagram depicting the logical sequence of stepsfor controlling the mixing valve servo in accordance with the presentinvention;

FIG. 4 is a schematic diagram illustrating one presently preferredembodiment of the present invention;

FIG. 5 is an exemplary wave form diagram useful in describing theoperation of the invention; and

FIG. 6 is a flow charge diagram depicting the logical sequence of steps4 generating an error in accordance with the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 illustrates one embodiment of a zinc chlorine battery system inconnection with which the present invention may be used. The batterysystem is designated 10 and means are provided to achieve the desiredflows of chlorine, electrolyte, water and heat, with a generaldescription thereof now following.

In charge, pump P1 deliver electrolyte to pockets 12 between pairs ofporous graphite chlorine electrodes 14 in the battery stack 15. Theelectrolyte passes through the porous chlorine electrodes 14 into thechamber 16 between the zinc electrode 17 and chlorine electrodes 14,flows up between the electrodes and eventually spills through highresistance cascades back into the sump 18. Chlorine gas is pumped bypump P2 through line C. Before entering pump P2, the chlorine gas ismixed with chilled electrolyte which passes through line W and comesfrom the bottom of the store 20. The chlorine and chilled electrolyteare mixed in gas pump P2, chlorine hydrate forms, and the chlorinehydrate-electrolyte mixture is deposited in the store 20 through line H.The electrolyte in line W is chilled by passage through a heat exchanger40. Glycol cooled by means of a chiller unit 42 is circulated throughline 44 of heat exchanger 40.

In discharge, the valve 24 in line D is open, permitting a stream ofwarm electrolyte to pass through a heat exchanger 26 in the store.Chlorine is formed by decomposition of chlorine hydrate in the store 20.On development of the required pressure in the store, the valve 28 inline G is opened and the chlorine passes into line E on the higherpressure side of the electrolyte pump P1. The chlorine dissolves in theelectrolyte which is then fed to the porous graphite chlorine electrodes14. The battery stack 15 can now be discharged, wherein electrodedissolution of the zinc occurs at the zinc electrode 17, reduction ofthe dissolved chlorine occurs at the chlorine electrode 14, power isavailable at the battery terminals 30 and 31, and zinc chloride isformed in the electrolyte by reaction of zinc and chlorine to form zincchloride.

It is to be understood that the foregoing constitutes a description of atypical metal halogen battery system in connection with which theinvention may be practiced. As such, the above description is not to beviewed as a limitation of the invention as set forth in the appendedclaims. Similarly, the chiller unit 42, to be discussed more fullybelow, is exemplary of a typical chiller unit useable in practicing theinvention in its presently preferred embodiments. Modifications in thechiller unit may be made, or other chiller units may be substitutedtherefore without departing from the scope of the appended claims.

Chiller unit 42 includes heat exchanger 46 coupled to refrigeration unit48 for removing heat from glycol cooling circuit 50. Refrigeration unit48 may comprise a commercially available refrigerator or heat pumpcirculating a coolant such as freon through line 52 of heat exchanger46. Glycol cooling circuit 50 is in turn coupled through line 44 of heatexchanger 40, by means of quick disconnect fittings or couplings 54, 56,58 and 60. More particularly, glycol coolant circuit 50 includes line 62coupled between heat exchanger 46 and heat exchanger 44 via couplings 54and 56. Circuit 50 further includes reservoir 64 disposed within circuit50 to receive coolant from heat exchanger 44 via coupling 58, line 66,and coupling 60. Glycol coolant is removed from reservoir 64 throughline 68 by means of pump 70, which in turn feeds coolant to proportionalmixing valve 72 through line 74. Proportional mixing valve 72 may beimplemented using a servo motor controlled rotary valve of the typedisclosed in copending patent application Ser. No. 291,030, referencedabove, and entitled Liquid Cooling System and Proportional Valve for theSame. Mixing valve 72 includes a first outlet port 76 coupled throughline 78 to heat exchanger 46, and a second output port 80 coupledthrough line 82, shut off valve 84 and line 86 into line 62, by means ofa T fitting for example. Mixing valve 72 is actuated by means of servomotor 90 to direct the flow of coolant in variable proportions throughheat exchanger 46 and/or through line 82 bypassing heat exchanger 46. Byadjusting the relative proportions of coolant circulated through heatexchanger 46 versus coolant bypassing heat exchanger 46, heat can beextracted from the coolant in circuit 50 by refrigeration unit 48 incontrolled amounts. By virtue of this proportional mixing arrangement,the heat capacity of the entire quantity of circulating fluid serves tosustain or hold its temperature relatively constant. Bypassing aproportion of this coolant through heat exchanger 46 for heat removalthereby effects controlled temperature adjustments without upsetting thegeneral temperature equilibrium of the coolant circuit as a whole.

In accordance with the present invention servo motor 90 includes a firstterminal 92 for driving in a clockwise direction and a second terminal94 for driving in a counter clockwise direction. Servo motor 90 furtherincludes ground terminal 96 which in conjunction with either terminal 92or terminal 94 is used to energize motor 90. In the presently preferredembodiment servo motor 90 may be a commercially available bidirectionalAC motor, which has the advantage of being relatively inexpensive. Ingeneral, however, other suitable motors may be used without departingfrom the spirit of the invention. Motor 90 may be coupled through theappropriate gearing (not shown) for more precise control of mixing valve72. In addition, mixing valve 72 may include positive stops to preventrotation beyond predetermined limits, typically 90° in either direction.

During charge, the electrolyte of zinc chloride solution forms a hydratewithin store 20. To promote the formation of such hydrate thetemperature within the electrolyte solution must be maintained at thehydration formation temperature (nominally -3°+3° C.) preferably within1/10th of a degree centrigrade of such temperature. If the temperatureis permitted to rise much above the hydration formation temperature,hydration formation will be considerably diminished and the performanceof the battery is significantly impaired. On the other hand, if thetemperature is permitted to drop much below the hydration formationtemperature, the system will freeze up and impair the battery'soperation.

To further complicate the problem of maintaining the solution at thehydration formation temperature, the hydration formation temperaturechanges during the charging process. As the charging process progressesand the hydrate accumulates, the concentration of zinc chloride insolution changes, causing the hydration formation temperature togradually and continually rise. FIG. 2 illustrates this rise inhydration formation temperature, wherein curve 100 represents thehydration formation temperature profile as a function of charge (orhydrate concentration). As will be explained more fully below,piecewise-linear line 102 represents a first order approximation of thehydration formation temperature profile. This piecewise-linear firstorder approximation may be determined by a curve fitting algorithmdescribed more fully below. It will be understood, however, that higherorder approximations or different curve fitting algorithms may beimplemented according to the principles disclosed herein.

Referring now to the flow chart diagrams of FIGS. 3 and 6 the methodaccording to the present invention will now be discussed. Beginningfirst with FIG. 6 block 200 depicts the step of sensing or measuring thetemperature within the glycol cooling circuit. Since the glycol coolingcircuit is in thermal communication with the hydrate forming electrolytethrough heat exchanger 40, this temperature follows quite closely theactual temperature of the electrolyte and may thus be used for feedbackcontrol purposes. In practice the temperature sensing step of block 200involves reading the voltage drop across or current flow throughthermistor 202, which is disposed in thermal communication with line 66as shown in FIG. 1. The thermistor reading is then linearized and scaledaccording to the BASIC program in steps 1240 through 1280 set forth inthe appendix. To eliminate spurious readings and noise the scaledthermistor reading is passed through software filter 204 which averagesa predetermined number of readings to produce a filter temperatureindication. Next, the set point temperature or desired temperature iscalculated or generated using a curve fitting algorithm such as thealgorithm illustrated in FIG. 2. This step is depicted in FIG. 6 byblock 206, and is accomplished in accordance with the BASIC programsubroutine lines 29100 through 29190 set forth in the appendix. Forconvenience, the variables used to implement the BASIC program set forthin the appendix comprise a plurality of subscripted variables containedin an array. Referring to lines 29100 through 29190 of the BASICprogram, line 29110 will be seen as an equation for the upwardly slopingportion of piecewise-linear line 102. This segment, which is denoted byreference numeral 210 may be described using the general equation for astraight line, namely Y=MX+B. Accordingly, in line 29110 of the programvariable X9 corresponds to the Y value of the straight line equation,S(26) corresponds to slope M, R1(8) corresponds to X and S(27)corresponds to B, the Y intercept. According to the curve fittingalgorithm if the computed value X9 is below a certain limit S(25) thenthe computed value X9 is set equal to the reference value S(25). In FIG.2 this minimum reference value is denoted as "MIN" and the line segment212 is generated when this minimum value is not exceeded.

Having now measured an actual temperature and also having computed adesired temperature or set point temperature, these two temperatures arecompared in step 214 to produce an error or difference value. Control ofthe method then branches according to block 216 to a servo controlsubroutine which selectively actuates servo motor 90 in either aclockwise or counterclockwise direction in accordance with the errorvalue. The servo control subroutine is illustrated in FIG. 3.

With reference to FIG. 3 and the timing diagrams of FIG. 5, control ofservo motor 90 proceeds as follows. Beginning with step 300 variable X₃is set equal to a timer variable which measures elapsed time. Inpractice it is often convenient to utilize a real time clock to providethe timer signals. In FIG. 5 the timing sequence is illustrated using afirst line entitled SUBRT CALL which marks, by means of a downwardlydirected arrow, each time the servo control subroutine is called.Preferably the subroutine is called at a periodically constant rate. InFIG. 5 the dotted lines labeled X₃ (irrespective of superscripts) markwhen X₃ is set equal to the timer. Later in the description it will beexplained that another variable X₂ is also set equal to the timer. Thesetwo variables behave somewhat like a stopwatch, wherein X₂ marks theturning on of the stopwatch and X₃ marks the turning off of thestopwatch. Thus the difference X₃ -X₂ is an elapsed time measurement.Although the flow chart of FIG. 3 and the timing diagram of FIG. 5 fullyillustrate the servo control portion of the present invention, referencemay also be had to lines 29200 through 29290 of the BASIC program setforth in the appendix, which may be used to implement the servo controlmechanism. In step 302 variable X₄ is computed as a function of error,error having previously been computed by the steps set forth in FIG. 6.X₄ represents an intermediate value which is used in step 306 to computeX₁ the desired time period between servo control impulses. Since thevariable X₁ is inversely proportional to variable X₄, steps 304 and 305are provided to assure that the computation will not attempt to divideby zero should X₄ equal zero. Of the steps discussed thus far, step 300corresponds to line 29210 of the BASIC program in the appendix, whilelines 302, 304, 305 and 306 correspond to lines 29215 and 29220 of theBASIC program. Next step 308 tests to determine whether the elapsed timemeasured by the stopwatch variables X₃ -X₂ is less than the desired orcalculated time between pulses X₁. It will be noted for small error thecalculated time variable X₁ is generally large, resulting in the programbranching to the exit point 318. This corresponds to the test performedby line 29230 of the BASIC program and branching to line 29270. If, onthe other hand, the error is large program control branches to block310. A large error indicates generally that the actual temperature anddesired temperature are sufficiently far apart that corrective measuresmust be taken by the servo motor 90 which controls mixing valve 72. Step310 determines whether the error value is positive or negative in signor polarity. In other words, step 310 determines whether the servo motor90 must be actuated in a clockwise or a counterclockwise direction. Itwill be understood that one sense of rotation causes a greater quantityof chilled glycol coolant to be mixed with and circulated throughcoolant circuit 50, while the other sense of rotation reduces the amountof chilled glycol mixed into the system. If the sign of error value ispositive control branches to 312 whereupon a burst or impulse ofelectrical energy is emitted to the clockwise terminal 92 of servo motor90. If the sign of the error value is negative, an impulse is output tothe counterclockwise terminal 94 of servo motor 90. Lines 29240 and29250 correspond to these two possibilities. After either a clockwise orcounterclockwise pulse has been emitted, step 316 sets stopwatchvariable X₂ equal to the present timer value. It should be noted thatthe X₂ variable is reset to the present timer value only if controlproceeded through blocks 310, and 312 or 314. If, on the other hand, thetest performed in block 308 determine that the error was notsufficiently large to emit a servo control pulse, control branchesaround the stopwatch block 316 and thus stopwatch variable X₂ wouldremain at the value to which it had, at some previous time, been set.With reference to FIG. 5 four successive exemplary subroutine calls areillustrated, denoted by letters A, B, C and D. It is be understood thatthe specific sequence illustrated in FIG. 5 is exemplary and forillustrative purposes only and is not to be construed as a limitation ofthe scope of the present invention. In the example shown in FIG. 5 thefirst subroutine call A is presumed to have occurred based on eventsoccurring prior in time, thus subroutine call A is used herein as ameans of setting up exemplary conditions for the next successivesubroutine call B. In subroutine call A it is presumed that an impulsewas an output on line CW and thus no impulse was output on line CCW.After the impulse is emitted stopwatch variable X₂ is set to the presenttimer value. Some time later at subroutine call B stopwatch variable X₃is set to the present timer value. This timer value is of coursedifferent from the previously set stopwatch variable X₂ since a certainamount of time has elapsed between the end of subroutine call A and thebeginning of subroutine call B. The elapsed time is X3-X2. Next,according to the algorithm of FIG. 3 the error is determined in bothmagnitude and sign. For purposes of this example it will be assumed thata positive error is computed and that this error is greater than theelapsed time X₃ -X₂. Accordingly a pulse is emitted on the CW line andstopwatch variable X₂ ' is reset to the current timer value. Atsubroutine call C it is assumed for purposes of example that the erroris smaller than the new elapsed time X₃ '-X₂ '. Thus no pulse is emittedand X₂ ' is not updated. At subroutine call D it is assumed that theerror is greater in magnitude than the new elapsed time X₃ "-X₂ ' and isnegative in sign. Thus a pulse is emitted on the CCW line.

It will be understood that the foregoing description has adopted aconvention whereby positive error values produce clockwise servo motionwhile negative error values produce the opposite motion. This is not tobe viewed as a limitation of the invention, the opposite conventionbeing equally possible.

The above described method may be implemented using a digital computer,denoted generally by reference numeral 203 in FIG. 1, which has beenprogrammed to execute the steps set forth in the flow charts of FIGS. 3and 6. In some applications the computer may take the form of a controlcomputer such as the MACSYM 2 by Analog Devices. In general, a widevariety of computers may be used to implement the invention, includingmicroprocessor based computers. Moreover, while the presently preferredcomputer embodiment implements the above described algorithms using acomputer program or programs written in BASIC, it will be understoodthat the algorithms may be implemented using other computer languageswithout departing from the scope of the invention. The computer mayinclude analog input output ports for interfacing with the thermistortemperature sensor and also includes input output modules forinterfacing with the servo motor. In practice these interface modulesmay be included as part of the control computer, or they may be outboardinput output devices. Those skilled in the art will recognize that awide variety of analog to digital converters are available forinterfacing a thermistor to a digital computer, and also that digitallycontrolled switches are commercially available to switch 110 A.C. linecurrent to the servo in response to digital control signals from acomputer. The presently preferred digitally controlled switch or relayincludes optical isolation to protect the computer from possible damageby the high voltage line current.

A second presently preferred embodiment is illustrated in FIG. 4. Thisembodiment utilizes commercially available discrete components,integrated circuits and combinational logic and may be used to implementthe method of the invention at an economical cost in a minimum amount ofspace. In FIG. 1, the block given reference numeral 203 shows how thissecond embodiment is positioned in the circuit.

Referring to FIG. 4 the discrete circuit embodiment comprises powersupply 400 for delivering power at two different voltages to the controlcircuit of the invention. In practice the power supply delivers currentthrough lead 402 at a 12 volt D.C. potential and current through lead404 at a 5 volt D.C. potential. It will be understood that thesevoltages are nominal voltages selected in accordance with the powersupply requirements of the components which make up the control circuit.Specifically, power supply 400 includes in line fuse 406 through whichline A.C. current is supplied to transformer 408. These secondary oftransformer 408 is connected to bridge rectifier 410 which is in turncoupled across filter capacitor 412. A pair of voltage regulators 414and 416 are coupled in series with the positive terminal of bridgerectifier 410. Each voltage regulator includes an output filtercapacitor 418 and 420, respectively. Voltage regulator 414 deliversnominally 12 volts D.C. and may be implemented using a 7812 integratedcircuit. Voltage regulator 416 delivers nominally 5 volts D.C. and maybe implemented using a 7805 integrated circuit.

The control circuit of the presently preferred discrete componentembodiment includes a first set of input terminals 422 for coupling to adevice capable of providing an indication of the desired set pointtemperature, as was discussed above. In FIG. 4 this device isillustrated as a potentiometer 424 which may be manually set to give anindication of the desired set point temperature. Potentiometer 424 maybe manually or automatically reset during the battery charge cycle sothat the set point temperature follows or approximates the set pointprofile curve 100 of FIG. 2. In an alternative embodiment potentiometer424 may be replaced by a specific gravity meter capable of measuring thespecific gravity of the hydrate forming electrolyte, thereby providingan accurate indication of the desired set point temperature. In yetanother embodiment potentiometer 424 may be replaced by any of a numberof commercially available programmable controllers capable of producinga voltage of signal which changes over time in accordance with presetparameters. Such a programmable device may be programmed to implementthe curve fitting algorithm illustrated by the piecewise-linear function102 of FIG. 2, or otherwise approximate the temperature profile curve100.

The invention further comprises input terminals 426 for coupling tothermistor 202. Terminals 426 provide biasing for the thermistor bycoupling to a source of D.C. bias voltage as at 428 and through resistor430 to ground. A signal representing the desired set point temperatureis conveyed via lead 432 to the negative terminal of comparator 434while a signal representing the measured temperature is conveyed vialead 436 to the positive terminal of comparator 434. The output ofcomparator 434 on lead 438 represents the different between the measuredor actual temperature and the desired set point temperature. In otherwords, lead 438 conveys a signal representing an error value. This errorvalue has both a magnitude or absolute value and a sign or polarity. Theerror value is applied to circuit 440 which computes the absolute valueor magnitude of the error. The error is also applied to the input ofinvertor 442 which provides an output signal being the inverse of theerror; in other words, when the error signal is positive the output ofinverter 442 is negative, and vice versa. The inverted error signal isapplied via lead 444 to steering circuit 446. Also applied, via lead448, to steering circuit 446 is the error signal. The steering circuitreceives electrical impulses on lead 50 for controlling the servo motor90. Steering circuit 446 directs these impulses to either the CWterminal 92 or the CCW terminal 94 in accordance with the sign orpolarity of the error value. Steering circuit 446 may be implementedusing analog switches such as CD4016 integrated circuits.

Absolute value circuit 440 is also implemented using analog switchessuch as CD4016 integrated circuits interconnected as shown in FIG. 4.Four such analog switches make up the absolute value circuit 440 whichresponds to the error signal on lead 452 and its inverse on lead 454 toapply the actual temperature signal from lead 436 and the desired setpoint temperature from lead 432 to the positive or negative terminals oferror amplifier 456. The output of error amplifier 456 provides an errorsignal proportional to the absolute value or magnitude of the differencebetween the actual measured temperature and the desired set pointtemperature. This absolute value signal is applied through lead 458 to avoltage to frequency converter circuit 460. The output of voltage tofrequency converter 460 on lead 462 comprises an oscillatory signalwhose frequency varies in accordance with the error magnitude signal onlead 458. This variable frequency oscillating signal is applied to a oneshot circuit 464 which produces a series of impulses of preferably fixedpulse width, but of varying period between pulses, in accordance withthe frequency of the oscillating signal on lead 462. The output of oneshot circuit 464 is applied via lead 450 to steering circuit 446 wherethe impulses produced thereby are directed to either the clockwise orcounterclockwise terminals of servo motor 90. Solid state relays 466 and468 respond to the impulses produced by one shot circuit 464 to providethe necessary step up voltage and/or current needed to drive servo motor90.

In operation, the circuit thus described in connection with FIG. 4performs the steps illustrated in FIGS. 3 and 6. This discrete componentembodiment performs essentially as illustrated in the timing diagram ofFIG. 5.

While it will be apparent that the preferred embodiments of theinvention disclosed are well calculated to fulfill the objects abovestated, it will be appreciated that the invention is susceptible tomodification, variation and change without departing from the properscope or fair meaning of the invention.

                                      TABLE 1                                     __________________________________________________________________________    APPENDIX                                                                      1240                                                                             FOR I'=1 TO 9 @TEMPS                                                       1250                                                                             IF A(I'+3, 1)<.2 THEN R2(I')=99.9 GOTO 1280                                1260                                                                             IF A(I'+3, 1)>4.8 THEN R2(I'(I')=-99.9 GOTO 1280                           1270                                                                             R2(I')=4007.86/(LOG(A(I'+3, 1)*2.326667/(5.-A(I'+3, 1)))                      +13.441964-373.16                                                          1280                                                                             NEXT I'                                                                    9100                                                                             @EQUIL GLY T CURVE FIT                                                     9110                                                                             X9=S(26)*R1(8)+S(27)                                                       9120                                                                             IF X9<S(25) THEN S(21)=S(25)                                               9125                                                                             IF X9>=S(25) THEN S(21)=X9                                                 9130                                                                             RETURN                                                                     9190                                                                             @                                                                          9200                                                                             @TEMP CNTL SERVO                                                           9210                                                                             X3=TIMER                                                                   9215                                                                             X4=(X6+S(22)*X8) IF X4=0 THEN X4=.001                                      9220                                                                             X1=S(23)/ABS(X4)                                                           9230                                                                             IF X3-X2<X1 THEN GOTO 29270                                                9240                                                                             IF SGN(X4)=-1 THEN DOT(2,3)=1 WAIT .25 DOT(2,3)=0                          9250                                                                             IF SGN(X4)=+1 THEN DOT(2,4)=1 WAIT .25 DOT(2,4)=0                          9260                                                                             X2=TIMER                                                                   9270                                                                             RETURN                                                                     9290                                                                             @                                                                          __________________________________________________________________________

What is claimed is:
 1. A method of controlling the temperature within ametal-halogen battery having a supply of hydrate forming solution; afirst coolant circuit for exchanging heat with said solution and meansfor removing heat from said first coolant circuit includingrefrigeration means, second coolant circuit for transferring heat tosaid refrigeration means and proportional mixing valve means forcoupling said first and second coolant circuits comprising,determiningthe temperature of said solution; determining a set point temperature inaccordance with measurements indicative of the hydrate concentration ofsaid solution; comparing the temperature of said solution with said setpoint temperature to produce an error value having magnitude and sign;producing electrical impulses at time intervals varying in accordancewith the magnitude of said error value; and controlling saidproportional mixing value means in accordance with said electricalimpulses and the sign of said error value, thereby controlling thedegree of coupling between said first and second coolant circuits. 2.The method of claim 1 wherein said proportional mixing valve meansincludes servo motor means and the step of controlling said proportionalmixing valve means comprises driving said servo motor means inaccordance with said electrical impulses.
 3. The method of claim 2wherein servo motor means is bidirectional having means for driving in aclockwise direction and means for driving in a counter-clockwisedirection and wherein the step of controlling said proportional mixingvalve means comprises selectively driving said servo motor in aclockwise direction or in a counter-clockwise direction in accordancewith the sign of said error value.
 4. The method of claim 1 wherein thestep of determining the temperature of said solution comprises sensingthe temperature of said first coolant circuit.
 5. The method of claim 1wherein the step of determining a set point temperature comprisescomputing an estimated set point temperature based on said temperatureof said solution.
 6. The method of claim 1 wherein the step of producingelectrical impulses comprisesmeasuring an elapsed time with respect to apreceding electrical impulse; computing a set point time as a functionof said error value; comparing said set point time with said elapsedtime; and generating an electrical impulse in response to the outcome ofcomparing said set point time with said elapsed time.
 7. The method ofclaim 6 wherein said set point time is inversely proportional to saiderror value.
 8. The method of claim 6 wherein said set point time iscomputed by computing an intermediate value as a linear function of saiderror value; and computing said set point time as an inverselyproportional function of said intermediate value.
 9. The method of claim8 further comprising testing said intermediate value and changing saidintermediate value by a predetermined increment if said intermediatevalue equals zero.
 10. The method of claim 9 wherein said set point timeis inversely proportional to the magnitude of said intermediate value.11. The method of claim 1 wherein the step of determining thetemperature of said solution comprises measuring the temperature withinsaid first coolant circuit at a point in thermal communication with saidsolution.
 12. The method of claim 11 further comprising filtering themeasured temperature.
 13. An apparatus for controlling the temperaturewithin a metal-halogen battery having a supply of hydrate formingsolution; a first coolant circuit for exchanging heat with said solutionand means for removing heat from said first coolant circuit includingrefrigeration means, second coolant circuit for transferring heat tosaid refrigeration means and proportional mixing value means forcoupling said first and second coolant circuits comprising,means fordetermining the temperature of said solution and producing a temperaturesignal; means for producing a set point signal; comparing meansresponsive to said temperature signal and said set point signal forproducing an error signal having magnitude and sign; means for producingelectrical impulses at time intervals varying in accordance with themagnitude of said error signal; and control means responsive to the signof said error signal for coupling said electrical impulses to saidmixing value means, thereby controlling the degree of coupling betweensaid first and second coolant circuits.
 14. The apparatus of claim 13wherein said proportional mixing value includes servo motor means forselectively actuating said value towards positions of increased couplingand positions of decreased coupling.
 15. The apparatus of claim 13wherein said means for determining the temperature of said solutioncomprises thermistor means.
 16. The apparatus of claim 15 wherein saidthermistor means is disposed in thermal communication with said firstcoolant circuit.
 17. The apparatus of claim 15 wherein said thermistormeans is disposed in thermal communication with said hydrate formingsolution.
 18. The apparatus of claim 13 wherein said means for producinga set point signal comprises digital computer means.
 19. The apparatusof claim 13 wherein said means for producing a set point signalcomprises means for providing a set point reference signal variable withelapsed time.
 20. The apparatus of claim 13 wherein said means forproducing a set point signal comprises means for indicating the hydrateconcentration of said solution and for providing a set point referencesignal in accordance with said hydrate concentration.
 21. The apparatusof claim 13 wherein said comparing means comprises amplifier meanshaving inverting and non inverting input means receptive of saidtemperature signal and said set point signal.
 22. The apparatus of claim13 further comprising absolute value producing means responsive to saidtemperature signal and said set point signal for producing a magnitudesignal representative of the magnitude of said error signal.
 23. Theapparatus of claim 13 further comprising steering means receptive ofsaid error signal for controlling said mixing value means in accordancewith the polarity of said error signal.
 24. The apparatus of claim 13wherein said control means includes oscillating signal producing meansresponsive to said error signal.
 25. The apparatus of claim 24 whereinsaid oscillating signal producing means includes voltage to frequencyconverting means.
 26. The apparatus of claim 24 wherein said controlmeans further includes pulse generating means responsive to saidoscillating signal producing means.
 27. The apparatus of claim 26wherein said pulse generating means comprises one shot means.